package com.example.shopping.utils;

import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;

import org.xutils.common.Callback;
import org.xutils.http.RequestParams;
import org.xutils.x;

public class BaseActivity extends AppCompatActivity implements Callback.CommonCallback<String> {

    public void connectNetwork(String url){
        RequestParams params = new RequestParams(url);
        x.http().get(params,this);
    }
    @Override
    public void onSuccess(String result) {}
    @Override
    public void onError(Throwable ex, boolean isOnCallback) {}
    @Override
    public void onCancelled(CancelledException cex) {}
    @Override
    public void onFinished() {}
}
